class Array
{
	public static void main(String[] args){
			
		String strArrayStyle = "style1";
		//String strArrayStyle = "style2";
		arrayStyle(strArrayStyle);

	}
	
	public static void arrayStyle(String strArrayStyle){
		
		//There are two ways to initialize array
		
		if (strArrayStyle.equals("style1") ){
			int[] anArray;              // declares an array of integers
	
			anArray = new int[3];      // allocates memory for 10 integers
			            
			anArray[0] = 100; // initialize first element
			anArray[1] = 200; // initialize second element
			anArray[2] = 300; // etc.
			
			System.out.println("Array Style 2");
			System.out.println(anArray[0]);
			System.out.println(anArray[1]);
			System.out.println(anArray[2]);
		}
		
		if (strArrayStyle.equals("style2") ){
			//array style2
			int[]anArray = { 100, 200, 300  };    
			System.out.println("Array Style 1");
			System.out.println(anArray[0]);
			System.out.println(anArray[1]);
			System.out.println(anArray[2]);	
		}
	}
}